<include file="public@header"/>
</head>
<body>
<div class="wrap">
    <ul class="nav nav-tabs">
        <li><a href="{:url('meeting/order/fee')}">特装审图</a></li>
        <li class="active"><a href="{:url('meeting/order/detail',['id'=>$info['id']])}">详情</a></li>
    </ul>

    <form method="post" action="{:url('saveOrder')}" class="js-ajax-form">
        <div class="form-group">
            <label for="">展会</label>
            <input type="text" class="col-xs-9 form-control" disabled value="{$info.meeting_title}">
        </div>
        <div class="form-group">
            <label for="">收费项目</label>
            <input type="text" class="col-xs-9 form-control" disabled value="{$info.title}">
        </div>
        <div class="form-group">
            <label for="">总额(元)</label>
            <input type="number" class="col-xs-9 form-control" disabled value="{$info.total}">
        </div>
        <div class="form-group">
            <label for="">明细</label>
            <table class="table table-bordered">
                <tr>
                    <th>项目</th>
                    <th>价格</th>
                </tr>
                <foreach name="info.remark" item="v">
                    <tr>
                        <td>{$v.name}元</td>
                        <td>{$v.val}元</td>
                    </tr>
                </foreach>

            </table>
        </div>

        <div class="form-group">
            <label for="">缴费凭证</label>
            <div id="photos" class=" col-xs-12 pic-list unstyled">
                <notempty name="$info.image">
                    <foreach name="$info.image" item="v" key="k">
                        <div class="col-xs-3" id="savedimage{$k}">
                            <if condition="$info['is_pay'] eq 1||$info['is_pay'] eq 2">
                                <img src="{:cmf_get_image_url($v)}" style="height:136px;width: 136px;">

                                <else/>
                                <input id="photo-{$k}" type="hidden" name="image[]" value="{$v}">

                                <img id="photo-{$k}-preview" src="{:cmf_get_image_url($v)}"
                                     style="height:136px;width: 136px;"
                                     onclick="parent.image_preview_dialog(this.src);">
                                <a href="javascript:uploadOneImage('图片上传','#photo-{$k}');">替换</a>
                                <a href="javascript:(function(){$('#savedimage{$k}').remove();})();">移除</a>
                            </if>
                        </div>
                    </foreach>
                </notempty>

            </div>
            <if condition="$info['type'] eq 1">
                <a href="javascript:uploadMultiImage('图片上传','#photos','photos-item-wrapper');"
                   class="btn btn-primary btn-small">选择图片</a>
                <else/>
                <if condition="$info['is_sure'] gt 0">
                    <if condition="$info['is_pay'] neq 1&&$info['is_pay'] neq 2">

                        <a href="javascript:uploadMultiImage('图片上传','#photos','photos-item-wrapper');"
                           class="btn btn-primary btn-small">选择图片</a>
                    </if>
                </if>
            </if>
        </div>
        <if condition="$info['is_pay'] eq 3">
            <div class="form-group">
                <label for="">拒绝理由</label>
                <textarea name="" class="form-control" disabled rows="5">{$info.reason}</textarea>
            </div>
        </if>

        <if condition="$info['type']  eq 1">
            <div class="form-group text-center">
                <if condition="$info['is_pay'] neq 1&&$info['is_pay'] neq 2">
                    <input type="hidden" name="id" value="{$info.id}">
                    <input class="btn btn-primary" type="submit" value="提交">
                </if>
                <if condition="$info['is_pay'] eq 2">
                    <span class="text-success">已确认</span>
                </if>
            </div>
            <else/>
            <if condition="$info['is_sure'] gt 0">
                <div class="form-group text-center">
                    <if condition="$info['is_pay'] neq 1&&$info['is_pay'] neq 2">
                        <input type="hidden" name="id" value="{$info.id}">
                        <input class="btn btn-primary" type="submit" value="提交">
                    </if>
                    <if condition="$info['is_pay'] eq 2">
                        <span class="text-success">已确认</span>
                    </if>
                </div>
            </if>
        </if>
    </form>
</div>
<script src="__STATIC__/js/admin.js"></script>
<script type="text/html" id="photos-item-wrapper">
    <div class="col-xs-3" id="savedimage{id}">
        <input id="photo-{id}" type="hidden" name="image[]" value="{filepath}">
        <img id="photo-{id}-preview" src="{url}" style="height:136px;width: 136px;"
             onclick="parent.image_preview_dialog(this.src);">
        <a href="javascript:uploadOneImage('图片上传','#photo-{id}');">替换</a>
        <a href="javascript:(function(){$('#savedimage{id}').remove();})();">移除</a>
    </div>
</script>
</body>
</html>